package com.qf.blog.commons.utils;

import com.qf.blog.dto.TokenDto;

/**
 * User: key
 * ClassName:ThreadLocalUtils
 * Date: 2023/6/7
 * Time: 16:02
 * description:进行SSO（单点登录）的
 */
public class UserThreadLocal {
    private static ThreadLocal<TokenDto> threadLocal = new ThreadLocal<>();

    public static TokenDto get() {
        return threadLocal.get();
    }

    public static void set(TokenDto tokenDto) {
        threadLocal.set(tokenDto);
    }
    public static void remove(){
        threadLocal.remove();
    }
}
